<div class="bjui-pageHeader" style="background-color:#fefefe; border-bottom:none;">
    <form data-toggle="ajaxsearch" data-options="{searchDatagrid:$.CurrentNavtab.find('#order-process-list-filter')}">
        <fieldset>
            <legend style="font-weight:normal;">页头搜索：</legend>
            <div style="margin:0; padding:1px 5px 5px;">
                <span>状态：</span>
                <select name = 'search_status'>
                    <option value='1'>待分派</option>
                    <option value='2'>待接单</option>
                    <option value='3'>已接单</option>
                    <option value='4'>已完工</option>
                </select>

                <div class="btn-group">
                    <button type="submit" class="btn-green" data-icon="search">开始搜索！</button>
                    <button type="reset" class="btn-orange" data-icon="times">重置</button>
                </div>
            </div>
        </fieldset>
    </form>
</div>
<div class="bjui-pageContent">
    {{--toolbarItem: 'add,edit,del,|,import,export,exportf',--}}
    <table class="table table-bordered" id="order-process-list-filter" data-toggle="datagrid" data-options="{
            height: '100%',
            gridTitle : '工序工单列表',
            showToolbar: true,
            dataUrl: 'admin/order/getOrderProcessListData?callback=?',
            postData:{order_id:'{{$orderId}}'},
            dataType: 'jsonp',
            jsonPrefix: 'obj',
            {{--editMode: {dialog:{width:'800',height:500,title:'编辑挂号信息',mask:true}},--}}
            {{--editUrl: '../../html/datagrid/datagrid-edit.html?code={code}',--}}
            paging: {pageSize:60},
            showCheckboxcol: true,
            linenumberAll: true,
            filterThead: false,
            {{--importOption: {type:'dialog', options:{url:'../../html/datagrid/datagrid-import.html', width:500, height:300, title:'导入挂号信息'}},--}}
            {{--exportOption: {type:'file', options:{url:'http://b-jui.com/demo/export', loadingmask:true}}--}}
    }">
        <thead>
        <tr>
            <th data-options="{name:'id',width:100}">订单工序ID</th>
            <th data-options="{name:'process_title'}">工序名称</th>
            <th data-options="{name:'completed_number'}">需完成数量</th>
            {{--<th data-options="{name:'start_time'}">开工时间</th>--}}
            {{--<th data-options="{name:'estimated_time',width:270,}">预计完成时间</th>--}}
            {{--<th data-options="{name:'completed_time'}">确认完工时间</th>--}}
            <th data-options="{name:'process_order_status'}">订单状态</th>
            <th data-options="{name:'accept_user'}">接单人</th>
            <th data-options="{align:'center',width:500,render:orderProcessDetail}">操作</th>

            {{--<th data-options="{name:'fr',align:'center',width:70,type:'boolean',render:function(value){return value ? '√' : '×'}}">是否初诊</th>--}}
            {{--<th data-options="{name:'regdate',align:'center',type:'date',pattern:'yyyy-MM-dd HH:mm',render:function(value){return value?value.substr(0,16):value}}">挂号日期</th>--}}
            {{--<th data-options="{name:'sex',align:'center',width:45,type:'select',items:[{'true':'男'},{'false':'女'}]}">性别</th>--}}
            {{--<th data-options="{name:'age',align:'center',type:'number',width:45,render:function(value){return 2015-parseInt(value)}}">年龄</th>--}}
            {{--<th data-options="{name:'fr',align:'center',width:70,type:'boolean',render:function(value){return value ? '√' : '×'}}">是否初诊</th>--}}
            {{--<th data-options="{name:'see',align:'center',width:55,type:'boolean',render:function(value){return value ? '√' : '×'}}">已就诊</th>--}}
            {{--<th data-options="{name:'seedate',align:'center',type:'date',pattern:'yyyy-MM-dd HH:mm:ss'}">就诊时间</th>--}}
        </tr>
        </thead>
    </table>
</div>
<script>
    function orderProcessDetail(value, data) {
        var html = '<button type="button" class="btn btn-green" data-toggle="dialog" data-options="{id:\'order-process-detail-dialog\',fresh:true, url:\'/admin/order/getOrderProcessDetail\', title:\'查看详情\',width:800,height:500, data:{order_process_id:' + data.id + '}}"><i class="fa fa-edit"></i> 查看订单工序详情</button>';
        html += '<button type="button" class="btn btn-info" data-toggle="navtab" data-options="{id:\'order_porcess_course_navtab\',fresh:true, url:\'/admin/order/getOrderProcessCourseList\', title:\'员工订单列表\', data:{order_process_id:' + data.id + '}}"><i class="fa fa-sitemap"></i> 查看员工订单列表</button>';
        return html
    }
</script>